/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:岁亮亮
 * Date:2024-02-02
 * TIME:14:34
 */
public class Test {
    public static void main(String[] args) {
        BinaryTree binaryTree=new BinaryTree();
        BinaryTree.TreeNode root=binaryTree.creattree();
        binaryTree.preOder(root);
        System.out.println();
        binaryTree.inOder(root);
        System.out.println();
        binaryTree.outOder(root);
        System.out.println("=============");
        System.out.println("叶子结点个数为  "+binaryTree.getLeafNodeCount1(root));
        System.out.println("叶子结点个数为  "+binaryTree.getLeafNodeCount2(root));
        System.out.println("树的结点个数为  "+binaryTree.getTreeNodeCount1(root));
        System.out.println("树的结点个数为  "+binaryTree.getTreeNodeCount2(root));

    }
}
